inverse of a function with a fraction